
/**
 * Created by admin on 1/7/14.
 */
public class MomoMessage {

    public const int HEAD_LEN = 21;// [STX(1)][LEN(4)][TYPE(4)][INDEX(8)][PHONE(4)]
    public const int TAIL_LEN = 01;// [ETX(1)]
    public const int MIN_LEN = HEAD_LEN + TAIL_LEN;
    public const byte STX_BYTE = 2;
    public const byte ETX_BYTE = 3;

    public int cmdType = 0;
    public long cmdIndex = 0;
    public int cmdPhone = 0;
    public byte[] cmdBody;

    public const char BELL_CHAR = (char)7;
    public string BELL = "" + BELL_CHAR;

    public const char LF_CHAR = (char)10;
    public string LF = "" + LF_CHAR;

    public MomoMessage(int type, long index, int phone, byte[] body) {
        cmdType = type;
        cmdIndex = index;
        cmdPhone = phone;
        cmdBody = body;
    }
}
